﻿Public Class ThemeComposant

    Private _styleDisabled As styleEtatComposant
    Private _styleNormal As styleEtatComposant
    Private _styleMouseOver As styleEtatComposant
    Private _etat As etatComposant

    Public Sub New(ByVal styleStandard As styleEtatComposant, _
                   ByVal styleMouseOver As styleEtatComposant, _
                   ByVal styleDisabled As styleEtatComposant, _
                   ByVal etatEnCours As etatComposant)

        Me._styleNormal = styleStandard
        Me._styleMouseOver = styleMouseOver
        Me._styleDisabled = styleDisabled
        Me._etat = etatEnCours

    End Sub
    Public Sub New(ByVal styleUnique As styleEtatComposant)
        _styleNormal = styleUnique
        Me._etat = etatComposant.Enabled
    End Sub

    Public Property etat() As etatComposant
        Get
            Return _etat
        End Get
        Set(ByVal value As etatComposant)
            _etat = value
        End Set
    End Property
    Public ReadOnly Property styleEnCours() As styleEtatComposant
        Get
            Select Case _etat
                Case etatComposant.Enabled
                    Return _styleNormal
                    Exit Select
                Case etatComposant.MouseOver
                    Return _styleMouseOver
                    Exit Select
                Case etatComposant.Disabled
                    Return _styleDisabled
                    Exit Select
            End Select
            Return Nothing
        End Get
    End Property

    Public ReadOnly Property styleNormal() As styleEtatComposant
        Get
            Return _styleNormal
        End Get
    End Property
    Public ReadOnly Property styleMouseOver() As styleEtatComposant
        Get
            Return _styleMouseOver
        End Get
    End Property

End Class

Public Class styleEtatComposant

    Private _backColor As Color
    Private _backColor2 As Color
    Private _backColor3 As Color
    Private _backColor4 As Color
    Private _foreColor As Color
    Private _font As Font
    Private _borderColor As Color
    Private _angleRoundRect As Integer

    Public Sub New(ByVal backColor As Color, _
                   ByVal font As Font, _
                   ByVal foreColor As Color, _
                   ByVal borderColor As Color, _
                   ByVal angleRoundRect As Integer)
        _backColor = backColor
        _font = font
        _foreColor = foreColor
        _borderColor = borderColor
        _angleRoundRect = angleRoundRect
    End Sub
    Public Sub New(ByVal backColor As Color, _
                   ByVal backColor2 As Color, _
                   ByVal font As Font, _
                   ByVal foreColor As Color, _
                   ByVal borderColor As Color, _
                   ByVal angleRoundRect As Integer)
        _backColor = backColor
        _backColor2 = backColor2
        _font = font
        _foreColor = foreColor
        _borderColor = borderColor
        _angleRoundRect = angleRoundRect
    End Sub
    Public Sub New(ByVal backColor As Color, _
                   ByVal backColor2 As Color, _
                   ByVal backColor3 As Color, _
                   ByVal backColor4 As Color, _
                   ByVal font As Font, _
                   ByVal foreColor As Color, _
                   ByVal borderColor As Color, _
                   ByVal angleRoundRect As Integer)
        _backColor = backColor
        _backColor2 = backColor2
        _backColor3 = backColor3
        _backColor4 = backColor4
        _font = font
        _foreColor = foreColor
        _borderColor = borderColor
        _angleRoundRect = angleRoundRect
    End Sub

    Public Property backColor() As Color
        Get
            Return _backColor
        End Get
        Set(ByVal value As Color)
            _backColor = value
        End Set
    End Property
    Public Property backColor2() As Color
        Get
            Return _backColor2
        End Get
        Set(ByVal value As Color)
            _backColor2 = value
        End Set
    End Property
    Public Property backColor3() As Color
        Get
            Return _backColor3
        End Get
        Set(ByVal value As Color)
            _backColor3 = value
        End Set
    End Property
    Public Property backColor4() As Color
        Get
            Return _backColor4
        End Get
        Set(ByVal value As Color)
            _backColor4 = value
        End Set
    End Property

    Public Property font() As Font
        Get
            Return _font
        End Get
        Set(ByVal value As Font)
            _font = value
        End Set
    End Property
    Public Property borderColor() As Color
        Get
            Return _borderColor
        End Get
        Set(ByVal value As Color)
            _borderColor = value
        End Set
    End Property
    Public Property foreColor() As Color
        Get
            Return _foreColor
        End Get
        Set(ByVal value As Color)
            _foreColor = value
        End Set
    End Property
    Public Property angleRoundRect() As Integer
        Get
            Return _angleRoundRect
        End Get
        Set(ByVal value As Integer)
            _angleRoundRect = value
        End Set
    End Property

End Class
